#include "user_config.h"
#include "user_event.h"
#include "user_gpio.h"
#include "user_player.h"
#include "user_pwm.h"
#include "user_timer.h"
#include "user_uart.h"

#define TAG "auto_gpio"

#define YFC_FW_VER		  "yfc firmware version : 20231120_V1.0.0\n"

#define UART_SEND_MAX	  8
#define UART_HEAT_1   (unsigned char)0x5a	  
#define UART_TAIL_1   (unsigned char)0xef	  

typedef struct {
  char data[UART_SEND_MAX];	//串口发送数组
  unsigned char len;		   //发送长度
  unsigned int addr;		   //语音指令序号
  const char *CmdName;		  //语音指令标识符
  const char *playList;		  //
  const char *replyList;		  //
}yfcData;

const yfcData g_uart_buf[] = {
   {  {  0x5A, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0xEF}, 8, 0x0008, "wakeup_uni", "[103,104,105,106,107]", "[103,104,105,106,107]"}, //wakeup_uni
   {  {  0x5A, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0xEF}, 8, 0x0009, "exitUni", "[108]", "[108]"}, //exitUni
   {  {  0x5A, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x00, 0xEF}, 8, 0x001C, "doubleClick", "[7]", "[7]"}, //doubleClick
   {  {  0x5A, 0x00, 0x00, 0x1D, 0x00, 0x00, 0x00, 0xEF}, 8, 0x001D, "click", "[8]", "[8]"}, //click
   {  {  0x5A, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xEF}, 8, 0x0001, "muteClean", "[109]", "[109]"}, //muteClean
   {  {  0x5A, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xEF}, 8, 0x0002, "muteSet", "[110]", "[110]"}, //muteSet
   {  {  0x5A, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0xEF}, 8, 0x0003, "volumeUpUni", "[111,101]", "[111,101]"}, //volumeUpUni
   {  {  0x5A, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0xEF}, 8, 0x0004, "volumeDownUni", "[112,102]", "[112,102]"}, //volumeDownUni
   {  {  0x5A, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0xEF}, 8, 0x0005, "volumeMaxUni", "[101,101]", "[101,101]"}, //volumeMaxUni
   {  {  0x5A, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0xEF}, 8, 0x0006, "volumeMinUni", "[102,102]", "[102,102]"}, //volumeMinUni
   {  {  0x5A, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0xEF}, 8, 0x0007, "volumeMidUni", "[113,113]", "[113,113]"}, //volumeMidUni
   {  {  0x5A, 0x00, 0x00, 0x96, 0x00, 0x00, 0x00, 0xEF}, 8, 0x0096, "auto1", "[114]", "[114]"}, //auto1
   {  {  0x5A, 0x00, 0x00, 0x97, 0x00, 0x00, 0x00, 0xEF}, 8, 0x0097, "auto2", "[114]", "[114]"}, //auto2
   {  {  0x5A, 0x00, 0x00, 0x98, 0x00, 0x00, 0x00, 0xEF}, 8, 0x0098, "auto3", "[114]", "[114]"}, //auto3
   {  {  0x5A, 0x00, 0x00, 0x99, 0x00, 0x00, 0x00, 0xEF}, 8, 0x0099, "auto4", "[114]", "[114]"}, //auto4
   {  {  0x5A, 0x00, 0x00, 0x9A, 0x00, 0x00, 0x00, 0xEF}, 8, 0x009A, "auto5", "[114]", "[114]"}, //auto5
   {  {  0x5A, 0x00, 0x00, 0x9B, 0x00, 0x00, 0x00, 0xEF}, 8, 0x009B, "auto6", "[114]", "[114]"}, //auto6
   {  {  0x5A, 0x00, 0x00, 0x9C, 0x00, 0x00, 0x00, 0xEF}, 8, 0x009C, "auto7", "[114]", "[114]"}, //auto7
   {  {  0x5A, 0x00, 0x00, 0x9D, 0x00, 0x00, 0x00, 0xEF}, 8, 0x009D, "auto8", "[114]", "[114]"}, //auto8
   {  {  0x5A, 0x00, 0x00, 0x9E, 0x00, 0x00, 0x00, 0xEF}, 8, 0x009E, "auto9", "[114]", "[114]"}, //auto9
   {  {  0x5A, 0x00, 0x00, 0x9F, 0x00, 0x00, 0x00, 0xEF}, 8, 0x009F, "auto10", "[114]", "[114]"}, //auto10
   {  {  0x5A, 0x00, 0x00, 0xA0, 0x00, 0x00, 0x00, 0xEF}, 8, 0x00A0, "auto11", "[114]", "[114]"}, //auto11
   {  {  0x5A, 0x00, 0x00, 0xA1, 0x00, 0x00, 0x00, 0xEF}, 8, 0x00A1, "auto12", "[114]", "[114]"}, //auto12
   {  {  0x5A, 0x00, 0x00, 0xA2, 0x00, 0x00, 0x00, 0xEF}, 8, 0x00A2, "auto13", "[114]", "[114]"}, //auto13
   {  {  0x5A, 0x00, 0x00, 0xA3, 0x00, 0x00, 0x00, 0xEF}, 8, 0x00A3, "auto14", "[114]", "[114]"}, //auto14
   {  {  0x5A, 0x00, 0x00, 0xA4, 0x00, 0x00, 0x00, 0xEF}, 8, 0x00A4, "auto15", "[114]", "[114]"}, //auto15
   {  {  0x5A, 0x00, 0x00, 0xA5, 0x00, 0x00, 0x00, 0xEF}, 8, 0x00A5, "auto16", "[114]", "[114]"}, //auto16
   {  {  0x5A, 0x00, 0x00, 0xA6, 0x00, 0x00, 0x00, 0xEF}, 8, 0x00A6, "auto17", "[114]", "[114]"}, //auto17
   {  {  0x5A, 0x00, 0x00, 0xA7, 0x00, 0x00, 0x00, 0xEF}, 8, 0x00A7, "auto18", "[114]", "[114]"}, //auto18
   {  {  0x5A, 0x00, 0x00, 0xA8, 0x00, 0x00, 0x00, 0xEF}, 8, 0x00A8, "auto19", "[114]", "[114]"}, //auto19
   {  {  0x5A, 0x00, 0x00, 0xA9, 0x00, 0x00, 0x00, 0xEF}, 8, 0x00A9, "auto20", "[114]", "[114]"}, //auto20
};

#define MAX_YFC_DATA			31
#define MAX_WAITUP_WORK		4
#define MAX_WAITUP_REPLT		5

const char *waitUpCmdWork[] = { "小可爱","妈妈咪呀","灯小二","小邝同学"};
const char *exitCmdWork[] = { "退下"};
const char *volumeUpCmdWork[] = { "增加音量"};
const char *volumeDownCmdWork[] = { "减少音量"};
const char *volumeMaxCmdWork[] = { "最大音量"};
const char *volumeMinCmdWork[] = { "最小音量"};
const char *volumeMidWork[] = { "中等音量"};
const char *muteCleanCmdWork[] = { "语音开启"};
const char *muteSetWork[] = { "静音模式"};
